
/* Basics ______________________________________________________________________

	Paper: 
	
	A Radio Drama’s Effects on Attitudes Toward Early and 
	Forced Marriage: Results from a Field Experiment in Rural Tanzania
	
	Appendix Tables
	
	Author: dylan groves, dylanwgroves@gmail.com
	Date: 2022/08/04
________________________________________________________________________________*/


/* Introduction ________________________________________________________________*/
	
	clear all		
	clear matrix
	clear mata
	set more off
	global c_date = c(current_date)
	version 16
	
	global cps_efm_path "~/Dropbox/Wellspring Tanzania Papers/Wellspring Tanzania - Audio Screening (efm)/cps_replication"
	
	log using "~/Dropbox/Wellspring Tanzania Papers/Wellspring Tanzania - Audio Screening (efm)/cps_replication/cps_replication_log_appendix_10k", replace


/* Define Parameters ___________________________________________________________

	You must run this to set globals before running any regressions

*/

	#d ;
			
		/* set seed */
		set seed 			1956
							;
							
		/* rerandomization count */
		global rerandcount	10000
							;
							
							
		global cov_always	i.block_as											// Covariates that are always included
							i.rd_group
							;
							
							
		global cov_lasso	std_resp_female 										// Covariates that are used by LASSO
							std_resp_muslim							
							std_resp_age
							std_b_resp_samevillage
							std_b_resp_religiosity
							std_b_resp_literate 	
							std_b_resp_standard7 
							std_b_resp_nevervisitcity 
							std_b_resp_married 
							std_b_resp_hhh 
							std_b_resp_numkid
							std_b_resp_numhh
							std_b_resp_yrsvill
							std_b_values_likechange 
							std_b_values_techgood 
							std_b_values_respectauthority 
							std_b_values_trustelders
							std_b_ge_raisekids 
							std_b_ge_earning 
							std_b_ge_leadership 
							std_b_ge_noprefboy 
							std_b_fm_reject
							std_b_media_tv_any 
							std_b_media_news_never 
							std_b_media_news_daily 
							std_b_radio_any 
							std_b_radio_community_ever
							std_b_radio_call_ever
							std_b_radio_stations_tbc 
							std_b_radio_stations_pfm 
							std_b_radio_stations_voa 
							std_b_radio_stations_clouds
							std_b_asset_multiplehuts
							std_b_asset_rooms
							std_b_asset_mudwalls
							std_b_asset_radio
							std_b_asset_tv
							std_b_asset_cell
							std_b_asset_cellint
							std_b_asset_worseconditions
							std_b_hiv_exctot
							std_b_hiv_safe
							;
		
	#d cr

	
/* Table A.1  __________________________________________________________________

Afrobarometer Comparisons

*/

	* Homogeneize coding of our data for comparison
	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		keep if complier == 1 
		recode b_resp_education (0 1 2 3 4 5 6 7 = 0)(8 9 10 11 12 13 14 15 16 17 18 19 20 22 = 1), gen(compare_edu)	
		recode values_tzovertribe (1 2 3= 1)(4 5 = 0), gen(compare_nationalism)										
	
	** Columns: Sample 
		sum compare_edu															// asked at baseline
		sum assets_electricity 		if treat==0									// asked at endline
		sum b_radio_any 														// asked at baseline and at endline
		sum b_asset_tv 															// asked at baseline and at endline
		sum b_asset_cellint 													// asked at baseline and at endline
		sum ge_work 				if treat==0									// only asked at endline
		sum m_ipv_rej_disobey 		if treat==0									// asked at midline and at endline
		sum b_ge_leadership														// asked at baseline
		sum compare_nationalism 	if treat==0									// asked at endline
	
	* Homogeneize coding of Afrobarometer for comparison 
	use "${cps_efm_path}/cps_replication_afrobarometer_2019.dta", clear	
		recode Q38D (1 2 3 = 1)(4 5 = 0) (8 9 = .), gen(compare_ge_work)
		recode Q78B (1 = 1)(2 3 = 0)(-1 8 9 = .) , gen(compare_ge_ipv)
		recode Q16 (1 2 = 0)(3 4 5 = 1) (8 9 = .), gen(compare_ge_leadership)
		recode Q85B (-1 7 8 9 99 = .)(1 2 = 0)(3 4 5 = 1), gen(compare_nationalism)
		recode Q89A (2 = 1)(0 1 = 0)(-1 8 9 = .), gen(compare_assradio)
		recode Q89B (0 1 = 0)(2 = 1)(-1 8 9 = .), gen(compare_asstv)
		recode Q90 (0 = 0)(1 = 1)(-1 7 8 9 = .), gen(compare_asscellint)
		recode Q97 (-1 98 99 = .)(3 4 5 6 7 8 9 = 1)(0 1 2 = 0), gen(compare_edu)
		recode EA_SVC_A (-1 9 = .)(0 = 0)(1 = 1), gen(compare_electricity)

	** Columns: Afrobarometer - rural
		sum compare_edu					if URBRUR_COND == 1 
		sum compare_electricity			if URBRUR_COND == 1 
		sum compare_assradio			if URBRUR_COND == 1 
		sum compare_asstv				if URBRUR_COND == 1 
		sum compare_asscellint			if URBRUR_COND == 1 
		sum compare_ge_work				if URBRUR_COND == 1 
		sum compare_ge_ipv				if URBRUR_COND == 1 
		sum compare_ge_leadership		if URBRUR_COND == 1 
		sum compare_nationalism			if URBRUR_COND == 1 

	** Columns: Afrobarometer - Tanzania Rural
		sum compare_edu					if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_electricity			if URBRUR_COND == 1 & COUNTRY==29  	
		sum compare_assradio			if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_asstv				if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_asscellint			if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_ge_work				if URBRUR_COND == 1 & COUNTRY==29 
		sum compare_ge_ipv				if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_ge_leadership		if URBRUR_COND == 1 & COUNTRY==29  
		sum compare_nationalism			if URBRUR_COND == 1 & COUNTRY==29  

	
/* Table A.2 ___________________________________________________________________

Attrition and Compliance

comply_attend_any
attrition_midline
attrition_endline

*/

	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
	
	** Compliance
		** Column 1
		global dv complier
		global test twosided
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 2
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
	
		
	** Midline Attrition
		** Column 3
		global dv attrition_midline
		global test twosided
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 4
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		di "Adjusted R2: `e(r2_a)'"		
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
	** Endline Attrition
		** Column 5
		global dv attrition_endline
		global test twosided
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 6
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		di "Adjusted R2: `e(r2_a)'"		
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
		

/* Table A.3 ___________________________________________________________________

Balance
	
	m_fm_reject_norm
	m_em_reject_norm_under18
	
	
							resp_female 										
							resp_muslim							
							resp_age
							b_resp_samevillage
							b_resp_religiosity
							b_resp_literate 	
							b_resp_standard7 
							b_resp_nevervisitcity 
							b_resp_married 
							b_resp_hhh 
							b_resp_numkid
							b_resp_numhh
							b_resp_yrsvill
							b_values_likechange 
							b_values_techgood 
							b_values_respectauthority 
							b_values_trustelders
							b_ge_raisekids 
							b_ge_earning 
							b_ge_leadership 
							b_ge_noprefboy

*/

log using "~/Dropbox/Wellspring Tanzania Papers/Wellspring Tanzania - Audio Screening (efm)/cps_replication/cps_replication_log_appendix_balance2nd", replace

#d ;

		global balance		b_fm_reject
							b_media_tv_any 
							b_media_news_never 
							b_media_news_daily 
							b_radio_any 
							b_radio_community_ever
							b_radio_call_ever
							b_radio_stations_tbc 
							b_radio_stations_pfm 
							b_radio_stations_voa 
							b_radio_stations_clouds
							b_asset_multiplehuts
							b_asset_rooms
							b_asset_mudwalls
							b_asset_radio
							b_asset_tv
							b_asset_cell
							b_asset_cellint
							b_asset_worseconditions
							b_hiv_exctot
							b_hiv_safe
							;
		
	#d cr
	
	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
		
	foreach var of global balance {
	
			sum `var' if treat == 1
			sum `var' if treat == 0 
			
			global dv `var'
			global test twosided
			
			xi: reg $dv treat ${cov_always}, cluster(id_village_n)				
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
	
	}

	log close
		
/* Table A.4 ___________________________________________________________________

Perceived Community Norms about Early Forced Marriage, 15 Months After
Exposure
	
	fm_norm_reject
	fm_partner_reject
	em_norm_reject_dum
	
*/

	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
	keep if complier == 1 

	** Reject Forced Marriage - Community Rejects
		** Column 1
		global dv fm_norm_reject
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 2
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		di "Adjusted R2: `e(r2_a)'"		
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
	** Reject Forced Marriage - Partner Rejects
		** Column 3
		global dv fm_partner_reject
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 4
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
			
	** Reject Early Marriage - Community Rejects
		** Column 5
		global dv em_norm_reject_dum
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 6
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
					
	
	
/* Table A.5 ___________________________________________________________________

Views about Reporting an Underage Marriage to Authorities, 15 Months After
Exposure
	
em_report
em_report_norm
	
*/

	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
	keep if complier == 1 

	** Reject Forced Marriage - Community Rejects
		** Column 1
		global dv em_report
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 2
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
	** Reject Forced Marriage - Partner Rejects
		** Column 3
		global dv em_report_norm
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 4
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
			
	
		
		
		
/* Table A.6_____________________________________________________________________

Importance of Reducing Forced Marriage as a Political Priority, 15
Months After Exposure

	ptixpref_efm_first
	em_elect
	
*/

	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
	keep if complier == 1 

	** Top Priority
		** Column 1
		global dv ptixpref_efm_first
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 2
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
		
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
	** Vote EFM Platform
		** Column 3
		global dv em_elect
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 4
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
		
		
/* Table A.7 ___________________________________________________________________

Views about Gender Equality and Intimate Partner Violence, 15 Months
After Exposure

	ge_index
	ipv_rej_disobey_long
	ipv_norm_rej
	ipv_report
	
*/

	use "${cps_efm_path}/cps_efm_analysis.dta", clear
		merge 1:1 id_resp_uid using "${cps_efm_path}/cps_efm_ri.dta"
	keep if complier == 1 

	** Gender Equality Index
		** Column 1
		global dv ge_index
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 2
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
		
	** IPV - If disobeys (branched)
		** Column 3
		global dv ipv_rej_disobey_long
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 4
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"
		
	** IPV - Norm
		** Column 5
		global dv ipv_norm_rej
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 6
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"	
		
		
		
	** IPV - Report
		** Column 7
		global dv ipv_report
		global test onesided 
		
		xi: reg $dv treat ${cov_always}, cluster(id_village_n)					// This is the core regression
			di "Adjusted R2: `e(r2_a)'"	
			matrix table = r(table)
			global coef = table[1,1]    	//beta
			do "${cps_efm_path}/cps_efm_helper_pval_ri.do"
			di "${ripval}"
			
		** Column 8
		set seed 1956
		qui lasso linear $dv ${cov_lasso}										// This is the LASSO regression
			global lasso_ctls = e(allvars_sel)										
			global lasso_ctls_num = e(k_nonzero_sel)

		if ${lasso_ctls_num} != 0 {												// If lassovars selected	
			regress $dv treat ${cov_always} ${lasso_ctls}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}
			
		if ${lasso_ctls_num} == 0 {												// If no lassovars selected
			regress $dv treat ${cov_always}, cluster(id_village_n)
				matrix lasso_table = r(table)
			}	
			
		di "Adjusted R2: `e(r2_a)'"	
		global lasso_coef = lasso_table[1,1]    	//beta
		do "${cps_efm_path}/cps_efm_helper_pval_ri_lasso.do"
		di "${lasso_ripval2}"	
		
		
log close		
	